import * as YvanUI from 'yvan-ui-wotu'

const React = YvanUI.React
const {PageHeader} = YvanUI.Antd

export interface DemoPageProps {
    title: string
}

interface DemoPageState {
    form1: {
        f1: string,
        f2: string,
    },
    form2: {
        f1: string,
        f2: string,
    },
}

export default class DemoReact extends React.Component<DemoPageProps, DemoPageState> {

    constructor(prop: DemoPageProps) {
        super(prop);

        this.state = {
            form1: {
                f1: 'f11',
                f2: 'f12',
            },
            form2: {
                f1: 'f21',
                f2: 'f22',
            }
        }
    }

    render() {
        return (
            <div>
                <PageHeader
                    title={"PageHeader 标题" + this.state.form1.f1}
                    subTitle={"副标题 " + this.state.form1.f2}
                />
                <pre>{JSON.stringify(this.state, null, '  ')}</pre>
            </div>
        )
    }
}